package com.bandit.service.impl;

import com.bandit.mapper.RoleMapper;
import com.bandit.pojo.Role;
import com.bandit.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    RoleMapper roleMapper;

    @Override
    public Role getRoleByID(int id) {
        return roleMapper.getRoleByID(id);
    }

    @Override
    public List<Role> getRoleList(Role role) {
        return roleMapper.getRoleList(role);
    }

    @Override
    public int insertRole(Role role) {
        return roleMapper.insertRole(role);
    }

    @Override
    public int deleteRoleByID(int rid) {
        return roleMapper.deleteRoleByID(rid);
    }

    @Override
    public int deleteRoleByIDS(int[] rids) {
        return roleMapper.deleteRoleByIDS(rids);
    }

    @Override
    public int updateRole(Role role) {
        return roleMapper.updateRole(role);
    }


}
